<? 
//<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
session_start();
require ("inc.php");
admin_core::check();
$rows = 20;
$page = (int)((int)$_REQUEST['page']?(int)$_REQUEST['page']:1);
/* 以下是程序部份 */
$db_admin 		= &new db($scfg['db']['admin']);
$popedom 	= admin_core::getPopedomGroup();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?=$scfg['config']['SystemName']?> Control Panel</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="Script/lib.js" 	type="text/javascript"></script>
<script src="Script/lib.ext.js" type="text/javascript"></script>
<link  href="static/admincp.css" rel="stylesheet" type="text/css" id="css">
<script type="text/javascript">
var collapsed = $.cookie('cdb_collapse');
function collapse_change(menucount) 
{
	if(_.e('menu_' + menucount).style.display == 'none') 
	{
		_.e('menu_' + menucount).style.display = '';collapsed = collapsed.replace('[' + menucount + ']' , '');
		_.e('menuimg_' + menucount).src = './static/img/menu_reduce.gif';
	} else 
	{
		_.e('menu_' + menucount).style.display = 'none';collapsed += '[' + menucount + ']';
		_.e('menuimg_' + menucount).src = './static/img/menu_add.gif';
	}
	$.cookie('cdb_collapse', collapsed, 2592000);
}
</script>
</head>
<body style="margin:5px!important;margin:3px;">
<table width="146" border="0" cellspacing="0" align="center" cellpadding="0" class="leftmenulist" style="margin-bottom: 5px;">
  <tr class="leftmenutext">
    <td><div align="center"><a href="<?=$scfg['config']['PoweredCorpUrl']?>" target="_blank">网站首页</a>&nbsp;&nbsp;<a href="#"  onClick="parent.header.defaultmenu();return false;">常用工具</a></div></td>
  </tr>
</table>
<? foreach($popedom as $k=>$v){?>
<div id="<?=$k?>" <?=($k == $admin['purview_default']?'':'style="display:none"')?>>
	<? foreach($v["sub"] as $kk=>$vv){?>
      <table width="146" border="0" cellspacing="0" align="center" cellpadding="0" class="leftmenulist" style="margin-bottom: 5px;">
        <tr class="leftmenutext">
          <td><a href="###" onclick="collapse_change('<?=$k."_".$kk?>')"><img id="menuimg_<?=$k."_".$kk?>" src="./static/img/menu_reduce.gif" border="0"/></a>
              <a href="###" onclick="collapse_change('<?=$k."_".$kk?>')"><?=$vv["name"]?></a></td>
        </tr>
        <tbody id="menu_<?=$k."_".$kk?>">
          <tr class="leftmenutd">
            <td><table border="0" cellspacing="0" cellpadding="0" class="leftmenuinfo">
            	<? foreach($vv["sub"] as $kkk=>$vvv){?>
                <tr>
                  <td><a href="<?=$kkk?>" target="main"><?=$vvv?></a></td>
                </tr>
                <? }?>
              </table></td>
          </tr>
        </tbody>
      </table>
   <? }?>
</div>
<? }?>
<div>
<table width="146" border="0" cellspacing="0" align="center" cellpadding="0" class="leftmenulist">
  <tr class="leftmenutext">
    <td>你好,<?=admin_core::getMaster()?> &nbsp;<a href="login.php?act=logout" target="_top">退出</a>
    </td>
  </tr>
</table>
</div>
</body>
</html>
